package cn.brilliantfuture.commentry.entity;

// Generated 2012-5-29 10:32:36 by Hibernate Tools 3.3.0.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * RechargeRecord generated by hbm2java
 */
@Entity
@Table(name = "recharge_record", catalog = "cabinet", uniqueConstraints = @UniqueConstraint(columnNames = "recharge_code"))
public class RechargeRecord implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer rechargeRecordId;
	private String rechargeCode;
	private Integer purchaserId;
	private Integer type;
	private double amount;
	private double beforeBalance;
	private double afterBalance;
	private String unit;
	private Date rechargeTime;
	private boolean status;
	private Integer rechargeCardId;
	private String receiveCode;
	private String note;

	public RechargeRecord() {
	}

	public RechargeRecord(String rechargeCode, int purchaserId, Integer type, double amount, double beforeBalance, double afterBalance, String unit, Date rechargeTime, boolean status) {
		this.rechargeCode = rechargeCode;
		this.purchaserId = purchaserId;
		this.type = type;
		this.amount = amount;
		this.beforeBalance = beforeBalance;
		this.afterBalance = afterBalance;
		this.unit = unit;
		this.rechargeTime = rechargeTime;
		this.status = status;
	}

	public RechargeRecord(String rechargeCode, int purchaserId, Integer type, double amount, double beforeBalance, double afterBalance, String unit, Date rechargeTime, boolean status, Integer rechargeCardId, String receiveCode, String note) {
		this.rechargeCode = rechargeCode;
		this.purchaserId = purchaserId;
		this.type = type;
		this.amount = amount;
		this.beforeBalance = beforeBalance;
		this.afterBalance = afterBalance;
		this.unit = unit;
		this.rechargeTime = rechargeTime;
		this.status = status;
		this.rechargeCardId = rechargeCardId;
		this.receiveCode = receiveCode;
		this.note = note;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "recharge_record_id", unique = true, nullable = false)
	public Integer getRechargeRecordId() {
		return this.rechargeRecordId;
	}

	public void setRechargeRecordId(Integer rechargeRecordId) {
		this.rechargeRecordId = rechargeRecordId;
	}

	@Column(name = "recharge_code", unique = true, nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getRechargeCode() {
		return this.rechargeCode;
	}

	public void setRechargeCode(String rechargeCode) {
		this.rechargeCode = rechargeCode;
	}

	@Column(name = "type", nullable = false)
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "amount", nullable = false, precision = 22, scale = 0)
	public double getAmount() {
		return this.amount;
	}

	public void setAmount(double amount) {
		this.amount = amount;
	}

	@Column(name = "before_balance", nullable = false, precision = 22, scale = 0)
	public double getBeforeBalance() {
		return this.beforeBalance;
	}

	public void setBeforeBalance(double beforeBalance) {
		this.beforeBalance = beforeBalance;
	}

	@Column(name = "after_balance", nullable = false, precision = 22, scale = 0)
	public double getAfterBalance() {
		return this.afterBalance;
	}

	public void setAfterBalance(double afterBalance) {
		this.afterBalance = afterBalance;
	}

	@Column(name = "unit", nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getUnit() {
		return this.unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "recharge_time", nullable = false, length = 19)
	@NotNull
	public Date getRechargeTime() {
		return this.rechargeTime;
	}

	public void setRechargeTime(Date rechargeTime) {
		this.rechargeTime = rechargeTime;
	}

	@Column(name = "status", nullable = false)
	public boolean isStatus() {
		return this.status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	@Column(name = "recharge_card_id")
	public Integer getRechargeCardId() {
		return this.rechargeCardId;
	}

	public void setRechargeCardId(Integer rechargeCardId) {
		this.rechargeCardId = rechargeCardId;
	}

	@Column(name = "receive_code", length = 50)
	@Length(max = 50)
	public String getReceiveCode() {
		return this.receiveCode;
	}

	public void setReceiveCode(String receiveCode) {
		this.receiveCode = receiveCode;
	}

	@Column(name = "note", length = 1024)
	@Length(max = 1024)
	public String getNote() {
		return this.note;
	}

	public void setNote(String note) {
		this.note = note;
	}
	
	@Column(name = "purchaser_id", nullable = false)
	public Integer getPurchaserId() {
		return purchaserId;
	}

	public void setPurchaserId(Integer purchaserId) {
		this.purchaserId = purchaserId;
	}

}
